#ifndef NOISEGENERATOR_H
#define NOISEGENERATOR_H

#include "cwgen_global.h"

#include <QObject>
#include <QDebug>
#include <ao/ao.h>
#include <math.h>

class NoiseGenerator : public QObject
{
    Q_OBJECT
public:
    explicit NoiseGenerator(QObject *parent = 0);
    ~NoiseGenerator();

public slots:
    void setVolume(double volume);
    void genNoise();
    void stopNoise();
    
signals:

protected:
    void aoInit();
    void aoShutdown();

private:
    double _vol_;
    ao_device *dev;
    int driver;
    ao_sample_format fmt;
    bool _stop_flag;
    
};

#endif // NOISEGENERATOR_H
